// 封装轮播图数据
import { getBannerAPI } from '@/apis/home'
import { onMounted, ref } from 'vue'

export function useBanner() {
    const bannerList = ref([])
    const bannerApi = async () => {
    const res = await getBannerAPI({
        distributionSite:'2'
    })
    // console.log(res.data.result);
    bannerList.value = res.data.result
    }
    onMounted( () => {
    bannerApi()
    })
    // 导出
    return{
        bannerList
    }
}
